package classwork.demo1;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.Statement;

public class JdbcDemo7 {
    public static void main(String[] args) throws Exception {
        Class.forName("com.mysql.jdbc.Driver");
        Connection conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/db2",
                "root", "root");
        Statement st = conn.createStatement();

        //st.executeUpdate("update stu set name='老刘' where id='4'");
        //st.executeUpdate("update  stu set name='小雪',password='1999' where id='1'");
        //st.executeUpdate("delete from stu where id='4' ");
        st.executeUpdate("delete  from stu where id in('2','3')");
    }
}
